﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using WebWise.Models;

namespace WebWise.Controllers
{
    public class HomeController : Controller
    {

        public ActionResult Index()
        {
            ViewBag.Title = "Home";


            return View(SuperController.GetGlobalModel());
        }

        public JsonResult AddLink(string Name, string Url)
        {
            if (Name == null || Url == null)
            {
                return Json("0", JsonRequestBehavior.AllowGet);
            }


            SuperController.AddLink(Name, Url);

            return Json("1", JsonRequestBehavior.AllowGet);
        }
    }
}
